package com.tcm.item.mapper;

import com.tcm.item.domain.entity.Drugs;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface DrugsMapper {
    int deleteById(Long id);

    int deleteLogicById(Long id);

    int insert(Drugs record);

    Drugs findDrugsById(Long id);

    int update(Drugs record);

    List<Drugs> findDrugsPageByStoreId(@Param("storeId")Long storeId, @Param("offset")Long offset, @Param("pagesize")Long pagesize);

    Long countDrugsByStoreId(@Param("storeId")Long storeId);

    List<Drugs> listDrugsPage(@Param("offset")Long offset, @Param("pagesize")Long pagesize);

    Long countDrugs();

    List<Long> checkDrugsByStoreId(@Param("storeId") Long storeId, @Param("name")String name,
                                   @Param("specs")String specs, @Param("id")Long id);

    /**
     * 批量查询商品价格列表
     * @param ids
     * @return
     */
    List<BigDecimal> listDrugsPriceByIds(Long[] ids);

}